/**
 * Created with IntelliJ IDEA.
 * Description：类与对象
 * User: cjc
 * Date: 2025-03-09
 * Time: 12:18
 */
class Student {
    //成员变量
    public String name;
    public String gender;
    public int age;
    public double score;

    //成员方法
    public void Dohomework() {
        System.out.println(this.name + "正在做作业");
    }
    public static void main(String[] args) {
        Student stu1 = new Student(); //通过new实例化对象
        Student stu2 = new Student();
        stu1.name = "zhangsan";
        stu1.Dohomework();
    }
}